/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

/**
 *
 * @author Endlesslove
 */
public class ChiTietHoaDon  implements  Idata
{
    private String MaChiTietHoaDon;
    public String MaHoaDon;
    public String MaSach;
    public int SoLuongBan;
    public int DonGiaBan;
    
    public ChiTietHoaDon(String ...param)
    {
        MaChiTietHoaDon = param[0];
        MaHoaDon = param[1];
        MaSach = param[2];
        SoLuongBan = Integer.parseInt(param[3]);
        DonGiaBan =  Integer.parseInt(param[4]);
    }
    
    @Override
    public boolean Delete() 
    {
        return new BUS.ChiTietHoaDon().Delete(this);
    }

    @Override
    public boolean Insert() 
    {
        return new BUS.ChiTietHoaDon().Insert(this);
    }

    @Override
    public boolean Update() 
    {
        return new BUS.ChiTietHoaDon().Update(this);
    }

    @Override
    public Object[] getObjects() 
    {
        return new Object[]
        {
          MaChiTietHoaDon, MaHoaDon, MaSach, SoLuongBan, DonGiaBan
        };
    }
    @Override
    public String getID() 
    {
        return MaChiTietHoaDon;
    }
}
